<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <style>
        body {
            background: #fff
        }

        .aui-margin-b-15 {
            margin-bottom: 0 !important
        }

        .aui-list {
            background-image: none !important
        }

        .balance {
            height: 7.85rem;
            margin: 1rem .6rem;
            text-align: center;
            box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.1);
            border-radius: .5rem;
            padding-top: 1.2rem;
        }

        #app {
            margin: 0 .6rem
        }

        .add-img {
            height: 5.65rem;
            width: 5.65rem;
            margin-top: 1rem
        }

        .add-img img {
            height: 2rem;
            width: 1.95rem
        }

        .bottom-fixed button {
            width: calc(100% - 1.2rem);
            position: fixed;
            bottom: .35rem
        }
    </style>
</head>

<body>
    <div id="app">
        <section>
            <div class="flex font-13 text-color-3" style="position: relative;padding:0.6rem 0">
                <img src="../image/index/logo1.png" alt="" style="height:4.3rem;width:4.3rem;margin-right:0.6rem">
                <div class="">
                    <div class="font-semibold">
                        轻食香芒牛肉沙拉瘦身减肥蔬菜三百卡轻食香芒牛肉沙
                    </div>
                    <div class="font-10 text-color-9">
                        去冰/五分甜
                    </div>
                    <div class="flex-justify-between" style="position: absolute;bottom:0.6rem;width:calc(100% - 4.7rem)">
                        <div class="text-color-9">
                            ×1
                        </div>
                        <div class="font-12">
                            ¥<span class="font-17">25</span>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <section class="aui-content white-bg-radius">
            <div class="font-14 text-color-3">

                <div class="height-50 flex-justify-between" tapmod @click='toChooseType'>
                    <div class="flex-align-center">
                        <div>
                            售后方式
                        </div>
                        <span>{{type}}</span>
                    </div>
                    <img class='grey-right' src=" ../image/common/grey-right.png">
                </div>
                <div class="height-50 flex-justify-between" tapmod @click='toChooseReason'>
                    <div class="flex-align-center">
                        <div>
                            售后原因
                        </div>
                        <span>{{reason}}</span>
                    </div>
                    <img class='grey-right' src=" ../image/common/grey-right.png">
                </div>
                <textarea name="name" maxLength='150' placeholder="为了尽快处理您的售后申请，请填写详细的描述，并上传相应的图片作为退换依据~"></textarea>
                <div class='imgs'>
                    <div class="add-img flex-center">
                        <img src="../image/person/tianjia.png" alt="">
                    </div>
                </div>
            </div>
        </section>
        <section>
            <div class="bottom-fixed">
                <!-- 这里假设是跳动售后进度 -->
                <button class='red-btn' tapmode @click='submit'>提交申请</button>
            </div>
        </section>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript " src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js "></script>
<script type="text/javascript">
    var vm = new Vue({
        el: '#app',
        data: {
            type: '',
            reason: ''
        },
        methods: {
            toChooseType: function() {
                api.actionSheet({
                    cancelTitle: '取消',
                    buttons: ['退货', '退款', '仅退款']
                }, function(ret, err) {
                    if (ret) {
                        alert(JSON.stringify(ret));
                    } else {
                        alert(JSON.stringify(err));
                    }
                });

            },
            toChooseReason: function() {
                api.actionSheet({
                    cancelTitle: '取消',
                    buttons: ['七天无理由退换', '多拍/拍错/重拍', '质量问题']
                }, function(ret, err) {
                    if (ret) {
                        alert(JSON.stringify(ret));
                    } else {
                        alert(JSON.stringify(err));
                    }
                });

            },
            submit: function() {
                api.openWin({
                    name: 'after-sales-progress_win',
                    url: 'after-sales-progress_win.html',
                    pageParam: {
                        name: 'test'
                    }
                });
            }

        }

    });
    apiready = function() {
        api.parseTapmode();
    };
</script>

</html>
